import dayjs from "dayjs";

export function formatDate(dateString) {
  return dayjs(dateString).format("YYYY.MM.DD");
}

export function formatDate2(dateString) {
  return dayjs(dateString).format("YYYY-MM-DD");
}
export function computedTime(startDate) {
  const start = dayjs(startDate);
  const now = dayjs();
  const differenceInDays = now.diff(start, "day", true); // 使用浮点数表示天数差
  return Math.ceil(differenceInDays); // 向上取整
}
